<html>
    <head>
        <meta name="layout" content="authMain"/>
        <title>Login</title>
    </head>
    <body>
        <div class="body">
            <h1>Login</h1>

            <g:hasErrors bean="${user}">
                <div class="errors">
                    <g:renderErrors bean="${user}" as="list"/>
                </div>
            </g:hasErrors>

            <g:form action="login" method="post">
                <div class="dialog">
                    <table>
                        <tr class='prop'>
                            <td class='name'>
                                Username:
                            </td>
                            <td class="value ${hasErrors(bean: user, field: 'username', 'errors')}">
                                <input type='text' name='username' class="login" value='${user?.username}'/>
                            </td>
                        </tr>
                        <tr class='prop'>
                            <td class='name'>
                                Password:
                            </td>
                            <td class="value ${hasErrors(bean: user, field: 'password', 'errors')}">
                                <input type="password" name='password' class="login" value='${user?.password}'/>
                            </td>
                        </tr>
                        <tr class='prop'>
                            <td colspan="3">
                                <div class="buttons">
                                    <input type="submit" value="Login"/>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </g:form>
            <p>
                <g:link action="forgotPassword">Forgotten your password?</g:link>
                <g:link controller='register' action="index">Need to Sign Up?</g:link>
            </p>
        </div>
    </body>
</html>